# 机器学习课程 Makefile

.PHONY: help install test clean run

help:
	@echo "🎓 机器学习课程 - 可用命令:"
	@echo "  make install    - 安装依赖"
	@echo "  make test       - 运行测试"
	@echo "  make clean      - 清理文件"
	@echo "  make run WEEK=1 - 运行指定周次"

install:
	uv pip install -e .

test:
	python -m pytest tests/ -v

clean:
	find . -name "*.pyc" -delete
	find . -name "__pycache__" -delete
	rm -rf .pytest_cache .mypy_cache

run:
	@if [ -z "$(WEEK)" ]; then \
		echo "请指定周次: make run WEEK=1"; \
	else \
		cd Week$(WEEK)* && python *.py; \
	fi